<?php
namespace app\admin\controller;

use app\admin\logic\VipsLogic;
use app\admin\model\Member;
use app\BaseController;
use think\facade\Request;
use think\facade\View;

class Vips extends BaseController {
    //vip 会员列表
    public function vipList(){
    $param=Request::param();
    $where=VipsLogic::vipsWhere($param);
    $data=VipsLogic::vipsData($param);
    View::assign($data);
    View::assign('data',$data);
    $list=Member::vipList($where,$data);
    $page=$list->render();
    View::assign(['list'=>$list,'page'=>$page]);
    return View::fetch();
    }

    //vip 会员冻结(软删除)
     public function vipsDel(){
         $get=Request::get();
        $res=Member::vipDel($get);
        if ($res){
            $this->success('冻结成功',url('vipList'));
        }else{
            $this->error('冻结失败');
        }

      }

}